﻿using OA.Models.Root;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace OA.Models
{
    [Table("Sys_users")]
    public class SysUser:EntityBase
    {
        [Required, StringLength(50)]
        public string LoginName { get; set; }

        [Required, StringLength(50)]
        public string LoginPwd { get; set; }
        public SysPerson Person { get; set; }

        [ForeignKey(nameof(Person))]
        public int PersonId { get; set; }

        public ICollection<SysRole> Roles { get; set; }
    }
}
